package database;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class Append {
//	public static void main(String[] args) {
//		while (true) {
//			// Append ("append this");
//		}
//	}

	private boolean APPEND_PRINT_YES_NO = true; 
	
	public void AppendPrint(String string) {
		if (APPEND_PRINT_YES_NO) {
			System.out.println("\nAppendPrint:" + string + "\n");
		}
		return; 
	}
	
	public static void appendData(String filename, final String str) {

		
		File file = new File(filename);
		try {
			FileWriter writer = new FileWriter(file, true);
			writer.write(str + System.getProperty("line.separator"));
			writer.flush();
			writer.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}